package goods.api;

import goods.model.Product;
import goods.model.ProductBrand;
import goods.model.ProductCategory;
import goods.model.ProductFashion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Iterator;
import java.util.List;

/**
 * 产品接口
 * Created by Liang Wenxu on 2016/10/28.
 */
public interface ProductApi {

    public String toString();

    public Product findById(String id);

    public Product findOneById(String id);

    public Page<Product> findProductPage(String productName, Pageable pageable);

    public Page<Product> findProductPage(String categoryId, String productName, Pageable pageable);

    public Page<Product> findProductByParamPage(String productName,String categoryId, Boolean isDelete,Pageable pageable);


    public Page<Product> getProductPage(String productName, String storeId, ProductCategory productCategory, Pageable pageable);

    public void saveBean(Product bean);

    public void saveProductAndFashion(String categoryId, Product product, List<ProductFashion> list, String id, String value);

    public void saveAll(Iterable<Product> beanList);

    public void deleteById(String id);

    public List<Product> findByIds(Iterable<String> ids);

    public void deleteAllByIds(Iterable<String> ids);
}
